package com.bit.springiocdemo.config;

import com.bit.springiocdemo.model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class UserInfoConfig {
   // @Primary
    @Bean(name = {"user1","lisi"})
    public UserInfo user1() {
        UserInfo userInfo = new UserInfo(1,"lisi",15);
        return userInfo;
    }

    @Bean
    public UserInfo user2() {
        UserInfo userInfo = new UserInfo(2,"kiku",31);
        return userInfo;
    }
}
